
local function resp_headers_say()
	local h = ngx.resp.get_headers()
	for k,v in pairs(h) do
		ngx.say(k, ":", v)
	end
	ngx.say("table['connectin:']", h["connection"])
end

local function resp_headers_set()

	--set header
	ngx.header.Test_Nginx = 'Lua'
	ngx.header['A_Ver'] = 'aaaa'
	local a = ngx.header.Test_Nginx

	--insert cookie
	ngx.header['Set-Cookie'] = {'test1=1;test2=2;path=/test'}

	--del resp header
	ngx.header['Test-Nginx'] = nil
end

local function resp_header_ctl() 
	resp_headers_say()
	resp_headers_set()
end

--resp_header_ctl()


resp_headers_set()

